<div id="content">
    {switch $type}
    {case 1}
    <div id="title">学生登陆</div>
    <div id="user"><a href="{:url('login')}?type=1" id="chocse">学生</a><a href="{:url('login')}?type=2">教工</a>
<!--        <a-->
<!--            href="{:url('login')}?type=3">校外</a>-->
    </div>
    <div id="student">

        <table style="margin: 0 auto;">
            <input type="hidden" name="type" value="1">
            <tr>
                <th>学号：</th>
                <td><input type="number" name="stuid" required onchange="getstuid(this)"></td>
            </tr>
            <tr>
                <th>密码：</th>
                <td><input type="password" name="psw" required onchange="getpassword(this)"></td>
            </tr>
            <tr>
                <th>验证码：</th>
                <td><input type="text" name="captcha"></td>
            </tr>
            <tr>
                <td></td>
                <td><img src="{:captcha_src()}" id="img" alt="captcha"/></td>
            </tr>
            <tr>
                <td></td>
                <td><input type="submit" value="登　录" onclick="login()"></td>
            </tr>
        </table>

    </div>
    {/case}

    {case 2}
    <div id="title">教工登陆</div>
    <div id="user"><a href="{:url('login')}?type=1">学生</a><a href="{:url('login')}?type=2" id="chocse">教工</a>
<!--        <a-->
<!--            href="{:url('login')}?type=3">校外</a>-->
    </div>
    <div id="student">

        <table style="margin: 0 auto">
            <input type="hidden" name="type" value="2">
            <tr>
                <th>工号：</th>
                <td><input type="number" name="phone" required></td>
            </tr>
            <tr>
                <th>密码：</th>
                <td><input type="password" name="psw" required id="psw" onchange="getpassword(this)"></td>
            </tr>
            <tr>
                <th>验证码：</th>
                <td><input type="text" name="captcha"></td>
            </tr>
            <tr>
                <td></td>
                <td><img src="{:captcha_src()}" id="img" alt="captcha"/></td>
            </tr>
            <tr>
                <td></td>
                <td><input type="submit" value="登　录" onclick="login()"></td>
            </tr>
        </table>

    </div>
    {/case}

    {case 3}
    <!--    <div id="title">校外登陆</div>-->
    <div id="user"><a href="{:url('login')}?type=1">学生</a><a href="{:url('login')}?type=2">教工</a>
<!--        <a-->
<!--            href="{:url('login')}?type=3" id="chocse">校外</a>-->
    </div>
    <div id="student">

        <table style="margin: 0 auto;">
            <input type="hidden" name="type" value="3">
            <tr>
                <th>号码：</th>
                <td><input type="number" name="phone" required onchange="getphone(this)"></td>
            </tr>
            <tr>
                <th>密码：</th>
                <td><input type="password" name="psw" required id="psw" onchange="getpassword(this)"></td>
            </tr>
            <tr>
                <th>验证码：</th>
                <td><input type="text" name="captcha"></td>
            </tr>
            <tr>
                <td></td>
                <td><img src="{:captcha_src()}" id="img" alt="captcha"/></td>
            </tr>
            <tr>
                <td></td>
                <td><input type="submit" value="登　录" onclick="login()"></td>
            </tr>
        </table>

    </div>
    {/case}
    {/switch}
</div>
